// 页面内容配置
const pageContents = {
    'system-settings': {
        title: '系统设置',
        content: `
            <div class="page-header">
                <h2>系统设置</h2>
            </div>
            <div class="page-body">
                <div class="el-form">
                    <div class="form-item">
                        <label>系统名称</label>
                        <input type="text" class="el-input" value="信息科管理系统">
                    </div>
                    <div class="form-item">
                        <label>系统版本</label>
                        <input type="text" class="el-input" value="1.0.0">
                    </div>
                    <div class="form-item">
                        <label>系统主题</label>
                        <select class="el-select">
                            <option value="dark">深色主题</option>
                            <option value="light">浅色主题</option>
                        </select>
                    </div>
                    <button class="el-button primary">保存设置</button>
                </div>
            </div>
        `
    },
    'work-order': {
        title: '工单查询',
        content: `
            <div class="page-header">
                <h2>工单查询</h2>
                <div class="search-bar">
                    <input type="text" class="el-input" placeholder="搜索工单">
                    <button class="el-button primary">搜索</button>
                </div>
            </div>
            <div class="page-body">
                <table class="el-table">
                    <thead>
                        <tr>
                            <th>工单号</th>
                            <th>标题</th>
                            <th>状态</th>
                            <th>创建时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>WO2024001</td>
                            <td>系统维护</td>
                            <td>处理中</td>
                            <td>2024-01-20</td>
                            <td>
                                <button class="el-button small">查看</button>
                                <button class="el-button small">编辑</button>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        `
    },
    'dashboard': {
        title: '工作台',
        content: `
            <div class="page-header">
                <h2>工作台</h2>
            </div>
            <div class="quick-stats">
                <!-- 待处理工作统计 -->
            </div>
            <div class="work-list">
                <!-- 待办工作列表 -->
            </div>
        `
    },
    'work-create': {
        title: '创建工单',
        content: `
            <div class="page-header">
                <h2>创建工单</h2>
            </div>
            <div class="page-body">
                <form class="el-form">
                    <div class="form-item">
                        <label>工单类型</label>
                        <select class="el-select">
                            <option value="repair">设备维修</option>
                            <option value="maintenance">日常维护</option>
                            <option value="installation">设备安装</option>
                        </select>
                    </div>
                    <div class="form-item">
                        <label>问题描述</label>
                        <textarea class="el-input" rows="4"></textarea>
                    </div>
                    <!-- 其他表单项 -->
                    <button class="el-button primary">提交工单</button>
                </form>
            </div>
        `
    },
    // 添加更多页面内容...
};

// 修改 main.js 中的 handleMenuItemClick 函数
function handleMenuItemClick(menuItem) {
    const pageId = menuItem.dataset.page;
    if (!pageId) return;

    const pageContent = pageContents[pageId];
    if (!pageContent) return;

    // 更新内容区域
    const contentContainer = document.getElementById('content-container');
    contentContainer.innerHTML = pageContent.content;

    // 更新标题
    document.title = `${pageContent.title} - 信息科管理系统`;
} 